/**
 * @author Isabella Nake (isabella.nake@usi.ch)
 * @author Nicolas Lusa (lusan@usi.ch)
 */
package ch.usi.inf.pf2.time;

import ch.usi.inf.pf2.circuit.Component;
import ch.usi.inf.pf2.circuit.Value;

public abstract class Event {
	
	protected final Value value;
	protected final Component component;
	protected final int time;
	
	public Event(final Value value, final Component component, final int time){
		this.value = value;
		this.component = component;
		this.time = time;
		Schedule.addEvent(this);
	}
	
	public void printEvent(){
		System.out.println(component.getClass() + " " + component + ", and the value at time: " + time+ " is: " + value);
	}
	
	public int getTime() {
		return time;
	}
	

	public Value getValue() {
		return this.value;
	}
	
	public abstract void run();
	

}
